import { createRouter, createWebHashHistory } from "vue-router";
// 这里的路径引用可能会报错，可以参考文章【项目配置文件】每个文件的作用，配置过程中遇到的问题及解决办法
import Home from "../views/home.vue";
import Detail from "../views/detail.vue";

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home,
  },
  // 添加其他路由
  {
    path: "/search",
    name: "Search",
    component: () => import("../views/search.vue"),
  },
  {
    path: "/detail",
    name: "Detail",
    component: Detail,
  },
  {
    path: "/video-data",
    name: "VideoData",
    component: () => import("../views/video-data/index.vue"),
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
